/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package submarines;

/**
 *
 * @author sshiran
 */
public class enemyBoard extends Board {
    private Player playerBoard; 
    private int subs[];
    
    public enemyBoard(Player playerBoard){
        super();
        this.playerBoard = playerBoard;
        subs = Config.SUBMARINES.clone();
    }
    
    @Override
    public Player getPlayerOwner()
    {
        return playerBoard;
    }
    
    public boolean belongsTo(Player p) {
        return p == playerBoard;
    }
    
    public String getBelongsTo() {
        return playerBoard.getName();
    }
    
    public void removeSubFromSubs(int size)
    {
      subs[size-1]  --;
    }
    
    public int[] getRemainingSubs() {
        return subs;
    }
    
    public boolean canBeTargeted(int row, int col) {
        if (gameBoard[row][col].getSign() == Config.EMPTY_SQUARE_SIGN) //check if square is empty to hit
            return true;
        return false;
    }
    
    public boolean isMarked(int row, int col) {
        if (gameBoard[row][col].getSign() == Config.MARKED_SQUARE_SIGN) //check if square is marked
            return true;
        return false;        
    }
}
